// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : http://ekoindri.com/radphp/research/soap_sis_guru.php?wsdl
// >Import : http://ekoindri.com/radphp/research/soap_sis_guru.php?wsdl>0
// Encoding : ISO-8859-1
// Version  : 1.0
// (12/30/2011 12:08:51 AM - - $Rev: 28374 $)
// ************************************************************************ //
unit soap_sis_guru;

interface

uses
  InvokeRegistry,
  SOAPHTTPClient,
  Types,
  XSBuiltIns;

type

  // ************************************************************************ //
  // The following types, referred to in the WSDL document are not being represented
  // in this file. They are either aliases[@] of other types represented or were referred
  // to but never[!] declared in the document. The types from the latter category
  // typically map to predefined/known XML or Embarcadero types; however, they could also
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:string          - "http://www.w3.org/2001/XMLSchema"[Gbl]
  // !:integer         - "http://www.w3.org/2001/XMLSchema"[Gbl]
  TInfoServer = class; { "http://localhost"[GblCplx] }
  TInfoGuru = class; { "http://localhost"[GblCplx] }

  // ************************************************************************ //
  // XML       : TInfoServer, global, <complexType>
  // Namespace : http://localhost
  // ************************************************************************ //
  TInfoServer = class(TRemotable)
  private
    Fserver_host:     string;
    Fserver_database: string;
    Fserver_username: string;
    Fserver_password: string;
  published
    property server_host:     string read Fserver_host write Fserver_host;
    property server_database: string read Fserver_database write Fserver_database;
    property server_username: string read Fserver_username write Fserver_username;
    property server_password: string read Fserver_password write Fserver_password;
  end;

  // ************************************************************************ //
  // XML       : TInfoGuru, global, <complexType>
  // Namespace : http://localhost
  // ************************************************************************ //
  TInfoGuru = class(TRemotable)
  private
    FID:               Int64;
    FGURU_KODE:        string;
    FGURU_NAMA_AWAL:   string;
    FGURU_NAMA_TENGAH: string;
    FGURU_NAMA_AKHIR:  string;
    FGURU_STATUS:      string;
    FGURU_KELAS:       Int64;
    FGURU_UMUR:        Int64;
    FGURU_ALAMAT:      string;
    FGURU_KOTA:        string;
    FGURU_PROPINSI:    string;
    FGURU_KETERANGAN:  string;
  published
    property ID:               Int64 read FID write FID;
    property GURU_KODE:        string read FGURU_KODE write FGURU_KODE;
    property GURU_NAMA_AWAL:   string read FGURU_NAMA_AWAL write FGURU_NAMA_AWAL;
    property GURU_NAMA_TENGAH: string read FGURU_NAMA_TENGAH write FGURU_NAMA_TENGAH;
    property GURU_NAMA_AKHIR:  string read FGURU_NAMA_AKHIR write FGURU_NAMA_AKHIR;
    property GURU_STATUS:      string read FGURU_STATUS write FGURU_STATUS;
    property GURU_KELAS:       Int64 read FGURU_KELAS write FGURU_KELAS;
    property GURU_UMUR:        Int64 read FGURU_UMUR write FGURU_UMUR;
    property GURU_ALAMAT:      string read FGURU_ALAMAT write FGURU_ALAMAT;
    property GURU_KOTA:        string read FGURU_KOTA write FGURU_KOTA;
    property GURU_PROPINSI:    string read FGURU_PROPINSI write FGURU_PROPINSI;
    property GURU_KETERANGAN:  string read FGURU_KETERANGAN write FGURU_KETERANGAN;
  end;

  TInfoDaftarGuru = array of TInfoGuru; { "http://localhost"[GblCplx] }

  // ************************************************************************ //
  // Namespace : http://localhost/
  // soapAction: http://ekoindri.com/radphp/research/soap_sis_guru.php/%operationName%
  // transport : http://schemas.xmlsoap.org/soap/http
  // style     : rpc
  // binding   : SERVICE_GURUBinding
  // service   : SERVICE_GURU
  // port      : SERVICE_GURUPort
  // URL       : http://ekoindri.com/radphp/research/soap_sis_guru.php
  // ************************************************************************ //
  SERVICE_GURUPortType = interface(IInvokable)
    ['{9BB3BF1F-236C-A573-87EF-50BBBF1E819A}']
    function GURU_SIMPAN(const connection_string: TInfoServer; const GURU: TInfoGuru; const status: string): string; stdcall;
    function GURU_SIMPAN_DATASET(const connection_string: TInfoServer; const daftarguru: TInfoDaftarGuru): string; stdcall;
    function GURU_DATA(const connection_string: TInfoServer; const row: Int64; const key_word: string; const sort_type: string): TInfoDaftarGuru; stdcall;
    function GURU_DATA_SEMUA(const connection_string: TInfoServer; const sort_type: string): TInfoDaftarGuru; stdcall;
    function GURU_HAPUS(const connection_string: TInfoServer; const ID: Int64): string; stdcall;
  end;

function GetSERVICE_GURUPortType(UseWSDL: Boolean = System.False; Addr: string = ''; HTTPRIO: THTTPRIO = nil): SERVICE_GURUPortType;

implementation

uses
  SysUtils;

function GetSERVICE_GURUPortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): SERVICE_GURUPortType;
const
  defWSDL = 'http://ekoindri.com/radphp/research/soap_sis_guru.php?wsdl';
  defURL = 'http://ekoindri.com/radphp/research/soap_sis_guru.php';
  defSvc = 'SERVICE_GURU';
  defPrt = 'SERVICE_GURUPort';
var
  RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
  begin
  if UseWSDL then
    Addr := defWSDL
  else
    Addr := defURL;
  end;
if HTTPRIO = nil then
  RIO := THTTPRIO.Create(nil)
else
  RIO := HTTPRIO;
try
  Result := (RIO as SERVICE_GURUPortType);
  if UseWSDL then
    begin
    RIO.WSDLLocation := Addr;
    RIO.Service      := defSvc;
    RIO.Port         := defPrt;
    end
  else
    RIO.URL := Addr;
finally
  if (Result = nil) and (HTTPRIO = nil) then
    RIO.Free;
end;
end;

initialization

InvRegistry.RegisterInterface(TypeInfo(SERVICE_GURUPortType), 'http://localhost/', 'ISO-8859-1');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(SERVICE_GURUPortType), 'http://ekoindri.com/radphp/research/soap_sis_guru.php/%operationName%');
RemClassRegistry.RegisterXSClass(TInfoServer, 'http://localhost', 'TInfoServer');
RemClassRegistry.RegisterXSClass(TInfoGuru, 'http://localhost', 'TInfoGuru');
RemClassRegistry.RegisterXSInfo(TypeInfo(TInfoDaftarGuru), 'http://localhost', 'TInfoDaftarGuru');

end.
